{{ $expanded := .expanded | default false }}
{{ $inverted := .inverted | default false }}
{{ $size     := .size | default "normal" }}
{{ $social   := site.Params.social }}
{{ $twitter  := $social.twitter }}
{{ $reddit   := $social.reddit }}
{{ $gitter   := $social.gitter }}
<div class="buttons are-{{ $size }}">
  {{ template "button" (dict "url" $twitter "name" "Twitter" "color" "twitter-blue" "icon" "twitter" "expanded" $expanded "inverted" $inverted) }}
  {{ template "button" (dict "url" $reddit "name" "Reddit" "color" "reddit-orange" "icon" "reddit" "expanded" $expanded "inverted" $inverted) }}
  {{ template "button" (dict "url" $gitter "name" "Gitter" "color" "gitter-magenta" "icon" "gitter" "expanded" $expanded "inverted" $inverted) }}
</div>

{{ define "button" }}
<a class="button is-borderless has-text-weight-bold is-{{ .color }}{{ if .inverted }} is-inverted{{ end }}" href="{{ .url }}" target="_blank">
  <span class="icon">
    <i class="fab fa-{{ .icon }}"></i>
  </span>
  {{ if .expanded }}
  <span>
    {{ .name }}
  </span>
  {{ end }}
</a>
{{ end }}